package com.only4play.codegen.support.entitymapper;

import com.only4play.codegen.support.constants.ValidStatus;

public class GenericEnumMapper {
    public GenericEnumMapper() {
    }

    public Integer asInteger(ValidStatus status) {
        return status.getCode();
    }

    public ValidStatus asValidStatus(Integer code) {
        return (ValidStatus)ValidStatus.of(code).orElse(ValidStatus.INVALID);
    }
}
